﻿using System;

namespace PropGridInfo
{
	public class PropertyOrderPair : IComparable
	{
		public string Name
		{
			get
			{
				return this._name;
			}
		}

		public PropertyOrderPair(string name, int order)
		{
			this._order = order;
			this._name = name;
		}

		public int CompareTo(object obj)
		{
			int order = ((PropertyOrderPair)obj)._order;
			bool flag = order == this._order;
			int result;
			if (flag)
			{
				string name = ((PropertyOrderPair)obj)._name;
				result = string.Compare(this._name, name);
			}
			else
			{
				bool flag2 = order > this._order;
				if (flag2)
				{
					result = -1;
				}
				else
				{
					result = 1;
				}
			}
			return result;
		}

		private int _order;

		private string _name;
	}
}
